package cn.ml.chuji.game.che;

public class JiaoChe extends Che {
    public JiaoChe() {
    }

    public JiaoChe(String xingHao, String chePai, int riZhuJin) {
        super(xingHao, chePai, riZhuJin);
    }

    @Override
    public double pay(int tian) {
        double qian;
        qian = getRiZhuJin() * tian;
        double tmp = qian;
        if(tian > 7){
            qian = tmp * 0.9;
        }if (tian > 30){
            qian = tmp * 0.8;
        }if(tian > 150){
            qian = tmp * 0.9;
        }
        return qian;
    }
}
